#ifndef EVENTMANAGER_H
#define EVENTMANAGER_H

#include "events/Event.h"
#include "events/EventDispatcher.h"

class EventManager
{
public:

	static EventManager* getSingletonPtr()
	{
		if(mInstance==NULL)
			{
				mInstance = new EventManager();
			}
		return mInstance;
	}

	static EventManager& getSingleton()
	{
		if(mInstance==NULL)
			{
				mInstance = new EventManager();
			}
		return *mInstance;
	}

	static EventManager& getInstance() { return getSingleton(); }


	virtual ~EventManager();


	void addEventDispatcher(EventDispatcher*);

protected:
	std::map<std::string, EventDispatcher*> mEventDispatcher;

private:
	EventManager();

	static EventManager* mInstance;
};

#endif // EVENTMANAGER_H
